//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Drawing
{
    public class GeometryGuide : IOfficeXmlSerializable
    {
        private string fmla;
        private string name;

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        public string Formula
        {
            get { return fmla; }
            set { fmla = value; }
        }

        #region IOfficeXmlSerializable Members

        void IOfficeXmlSerializable.ReadXml(ReadContext context)
        {
            using (var c = context.Read("gd"))
            {
                Name = c.GetOptionalString("name");
                Formula = c.GetOptionalString("fmla");
            }
        }

        void IOfficeXmlSerializable.WriteXml(WriteContext context)
        {
            using (WriteContext c = context.Write("gd"))
            {
                c.SetOptionalString("name", Name);
                c.SetOptionalString("fmla", Formula);
            }
        }

        #endregion
    }
}